Release 10.1A: OpenEdge Development:
ProDataSets
Locating rows in the before- and after-tables
There is a pair of complementary attributes for the before- and after-table buffers that point to the record in one table that corresponds to the record in the other table:
after-buffer-hdl:BEFORE-ROWIDequals theRowIDof the record in the before-table that is the before-image for the record in the after-table held in the buffer handle. This attribute is set to the Unknown value (?) for records that have not been changed.before-buffer-hdl:AFTER-ROWIDreturns theRowIDof the record in the after-table that is the current version of the added or changed record in the before-table held in the buffer handle. Deleted records have anAFTER-ROWIDof the Unknown value (?).These attributes allow you, for example, to execute a static
FINDstatement with awhere-clausesuch asWHERE ROWID(ttBeforeTable) = ttAfterBuffer:BEFORE-ROWID, or a dynamicFIND-BY-ROWIDmethod, to retrieve the buffer handle for the corresponding record in the other table, to do comparisons of field values.The
ROW-STATE,AFTER-ROWID, andBEFORE-ROWIDattributes are all read-only.There are also attributes to point back and forth between the temp-tables themselves:
These attributes are also read-only.
In addition, you can point directly from the buffer for one table to the buffer for the other using these attributes on a buffer handle:
after-buffer-handle:BEFORE-BUFFERreturns the handle of the default buffer for the before-table that is associated with the after-table forafter-buffer-handle. Note thatafter-buffer-handlecan be any buffer for the after-table, while the buffer handle you get back as the attribute value is always the default buffer for the other table.before-buffer-handle:AFTER-BUFFERsimilarly returns the handle of the default buffer for the after-table, relative to any buffer for the before-table.When you pass a ProDataSet as a parameter remotely, any before-tables associated with its temp-tables are automatically and transparently marshaled along with it. If passed locally by value, then the before-tables are copied along with the after-tables. If passed locally
BY-REFERENCE, then all references to the before-table are available to the procedure receiving the ProDataSet.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |